package o2o.web.actions.sys;

import com.jinyou.utils.common.AjaxResult;
import o2o.task.sys.ShopAutoPopTask;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import o2o.system.data.SYS_SETTINGS;

// 自动提现
@Controller
public class SysAutoPopAction {

    // 自动提现
    @RequestMapping(method = RequestMethod.POST, value = "/sys/auto/pop")
    @ResponseBody
    public String system_version() {
        if (SYS_SETTINGS.SHOP_AUTO_POP_TYPE != null && SYS_SETTINGS.SHOP_AUTO_POP_TYPE == 1) {
            ShopAutoPopTask.shopAutoPopType1();
        } else if (SYS_SETTINGS.SHOP_AUTO_POP_TYPE != null && SYS_SETTINGS.SHOP_AUTO_POP_TYPE == 2) {
            ShopAutoPopTask.shopAutoPopType2();
        }
        return AjaxResult.successResult();
    }


}
